package org.blogwu.learn.temp;


import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.stream.Stream;

interface  T41{

}

abstract class T42 implements T41{

}

public class T4 {

    static int x=5,y=0;

    public static void main(String[] args) {
//        File file = new File("Data.txt");
//        FileWriter fileWriter = null;
//        try {
//            fileWriter = new FileWriter( file);
//            PrintWriter p = new PrintWriter( fileWriter);
////            Stream.of("0","1").forEach( p::write );
//
//            fileWriter.write( new char[]{'0','1'});
//            fileWriter.flush();
//        } catch (IOException e) {
//            e.printStackTrace();
//        }

        try {
            System.out.println(x / y);
        } catch (ArithmeticException ex) {
            System.out.println("e1");
            throw ex;
        } catch (RuntimeException ex) {
            System.out.println("e2");
        }
    }
}
